<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="Generator" content="EditPlus®">
    <meta name="Author" content="">
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
    <meta name="renderer" content="webkit">
    <title>我的购物车</title>
    <link rel="shortcut icon" type="image/x-icon" th:href="@{/myFile/imgold/icon/favicon.ico}">
    <link rel="stylesheet" type="text/css" th:href="@{/theme/css/base.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/theme/css/home.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/layui/css/demo.css}">
    <script type="text/javascript" th:src="@{/theme/js/jquery.js}"></script>
    <script type="text/javascript" th:src="@{/theme/js/delCartOnPages.js}"></script>
    <script type="text/javascript" th:src="@{/theme/js/searchToPage.js}"></script>
    <script type="text/javascript" th:src="@{/layui/layui.all.js}"></script>
    <script type="text/javascript" th:src="@{/theme/js/paging.js}"></script>

</head>
<input type="hidden" id="cartIdNull" th:value="${cartIsNull}">
<body style="overflow-x:hidden;">
<div class="main" th:if="${cartIsNull}=='notNull'">
    <div class="layui-row"  th:each="cart : ${allCart}"
         style="border-bottom: 1px solid #e6e6e6;padding:10px;">
        <div class="layui-col-sm6">
            <div class="grid-demo">
                <a href="#">
                    <img th:src="'/myFile/img/commodityPic/'+${cart.picLink}+''" width="90" height="90">
                    <p href="#" style="padding-left:20px;float:right;width:200px;height:40px"
                       th:text="${cart.typeName}"></p>
                </a>
            </div>
        </div>
        <div class="layui-col-sm6">
            <div class="grid-demo">
                <div style="margin-left:10px;margin-top:10px;height:30px;">
                    <span th:text="'￥'+${cart.price}" style="line-height:30px;color:red"></span>&nbsp×
                    <span th:text="${cart.commodityCount}"></span>
                    <button type="button" th:name="${cart.cartId}"
                            onclick="javascript:delCartOnPages(this)"
                            class="layui-btn layui-btn-sm layui-btn-primary"
                            style="float:right;margin-right: 0px;">
                        删除
                    </button>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row" th:if="${cartIsNull}=='notNull'">
        <div class="layui-col-sm12">
            <div class="grid-demo">
                <div style="margin-left:10px;height:30px;padding:20px 10px 20px 10px;" id="tips">
                    共<span th:text="${allCount}" style="line-height:30px;color:red"></span>件商品 总计<span
                        th:text="${allPrice}" style="color:red"></span>元
                    <button class="layui-btn layui-btn-sm layui-btn-danger"
                            onclick="javascript:window.parent.location='myCart?pageNum=1&pageSize=5'"
                            style="float:right;margin-right: 0px;">去购物车
                    </button>
                </div>
            </div>
        </div>
    </div>


</div>
<div class="layui-row" th:if="${cartIsNull}=='null'">
    <div class="layui-col-sm12">
        <div class="grid-demo">
            <div>
                <div style="margin:50px 50px 50px 90px;font-size: 14px;">您还没有添加商品哦~</div>
            </div>
        </div>
    </div>
</div>



</body>
</html>